package GUILayer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MainGUI extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainGUI frame = new MainGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainGUI() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JMenuBar menuBar = new JMenuBar();
		menuBar.setBounds(0, 0, 401, 21);
		contentPane.add(menuBar);
		
		JMenuItem mntmPakordre = new JMenuItem("PakOrdre");
		menuBar.add(mntmPakordre);
		
		JMenuItem mntmModtagordre = new JMenuItem("ModtagOrdre");
		menuBar.add(mntmModtagordre);
		
		JButton pakOrdreBtn = new JButton("PakOrdre");
		pakOrdreBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				startPakOrdreGUI();
				
			}
		});
		pakOrdreBtn.setBounds(37, 140, 89, 23);
		contentPane.add(pakOrdreBtn);
	}
	
	public void startPakOrdreGUI()
	{
		PakOrdreGUI pog = new PakOrdreGUI();
		pog.setVisible(true);
	}
}
